import java.util.List;

public class Text {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();

        BinaryTree.TreeNode root = binaryTree.createTree();

        List<Character> list = binaryTree.InorderTraversal(root);

        for (int i=0 ; i< list.size() ; i++){
            System.out.print(list.get(i) + " ");
        }
        System.out.println();

        List<Character> list1 = binaryTree.preOrderTraversal1(root);

        for (int i=0 ; i< list1.size() ; i++){
            System.out.print(list1.get(i) + " ");
        }
    }
    public static void main1(String[] args) {
//        List<Integer> list = new ArrayList<>() ;

        BinaryTree binaryTree = new BinaryTree();

        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.preOrder(root);
        System.out.println();

        binaryTree.inOrder(root);
        System.out.println();

        binaryTree.postOrder(root);
        System.out.println();

        System.out.println(binaryTree.getHeight(root));

        BinaryTree.TreeNode tmp = binaryTree.find(root,'D');
        System.out.println(tmp.val);
    }
}
